.annotate unique distinct

277

.annotate unique distinct -

# Count Avg Sum etc. take a distinct argument for finding unique values
p = Project.objects.all().annotate(Count('unit__name', distinct=True))

.annotate unique distinct -


p = Project.objects.all().annotate(Count('informationunit__username', 
                                         distinct=True))


Comments

Submit
0 Comments